package com.stylefeng.guns.modular.platform.model;

import java.io.Serializable;
import java.util.Date;

import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType;
import com.stylefeng.guns.common.constant.Enum.ActivityStatusEnum;
import com.stylefeng.guns.common.constant.Enum.ActivityTypeEnum;

/**
 * <p>
 * 平台活动表
 * </p>
 *
 * @author stylefeng123
 * @since 2018-07-25
 */
@TableName("platform_activity")
public class Activity extends Model<Activity> {

    private static final long serialVersionUID = 1L;

    /**
     * 主键id
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;
    /**
     * appId
     */
    @TableField("app_id")
    private String appId;
    /**
     * 活动类型：1-幸运大抽奖
     */
    @TableField("activity_type")
    private Integer activityType;
    /**
     * 活动名称
     */
    @TableField("activity_name")
    private String activityName;
    /**
     * 活动开始时间
     */
    @TableField("activity_start")
    private String activityStart;
    /**
     * 活动结束时间
     */
    @TableField("activity_end")
    private String activityEnd;
    /**
     * 活动说明
     */
    @TableField("activity_explain")
    private String activityExplain;
    /**
     * 未中奖说明
     */
    @TableField("lose_explain")
    private String loseExplain;
    /**
     * 中奖概率:单位%
     */
    @TableField("win_rate")
    private Double winRate;
    /**
     * 每日抽奖次数，默认-1不限
     */
    @TableField("lottery_time")
    private Integer lotteryTime;
    /**
     * 每次抽奖支出（金币等）
     */
    @TableField("lottery_expend")
    private Double lotteryExpend;
    /**
     * 每人最大中奖次数，默认-1不限
     */
    @TableField("max_win_time")
    private Integer maxWinTime;
    /**
     * 创建人
     */
    @TableField("create_id")
    private String createId;
    /**
     * 创建时间
     */
    @TableField("create_time")
    private Date createTime;
    /**
     * 修改时间
     */
    @TableField("update_time")
    private Date updateTime;
    /**
     * 状态 ：1-有效，0-无效
     */
    private Integer status;
    @TableField(exist = false)
    private String statusName;
    @TableField(exist = false)
    private String activityTypeName;


    public String getStatusName() {
		return ActivityStatusEnum.getDesc(this.status);
	}

	public void setStatusName(String statusName) {
		this.statusName = ActivityStatusEnum.getDesc(this.status);
	}

	public String getActivityTypeName() {
		return ActivityTypeEnum.getDesc(this.activityType);
	}

	public void setActivityTypeName(String activityTypeName) {
		this.activityTypeName = ActivityTypeEnum.getDesc(this.activityType);
	}

	public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }
    
    public String getAppId() {
		return appId;
	}

	public void setAppId(String appId) {
		this.appId = appId;
	}

	public Integer getActivityType() {
        return activityType;
    }

    public void setActivityType(Integer activityType) {
        this.activityType = activityType;
    }

    public String getActivityName() {
        return activityName;
    }

    public void setActivityName(String activityName) {
        this.activityName = activityName;
    }

    public String getActivityStart() {
        return activityStart;
    }

    public void setActivityStart(String activityStart) {
        this.activityStart = activityStart;
    }

    public String getActivityEnd() {
        return activityEnd;
    }

    public void setActivityEnd(String activityEnd) {
        this.activityEnd = activityEnd;
    }

    public String getActivityExplain() {
        return activityExplain;
    }

    public void setActivityExplain(String activityExplain) {
        this.activityExplain = activityExplain;
    }

    public String getLoseExplain() {
        return loseExplain;
    }

    public void setLoseExplain(String loseExplain) {
        this.loseExplain = loseExplain;
    }

    public Double getWinRate() {
        return winRate;
    }

    public void setWinRate(Double winRate) {
        this.winRate = winRate;
    }

    public Integer getLotteryTime() {
        return lotteryTime;
    }

    public void setLotteryTime(Integer lotteryTime) {
        this.lotteryTime = lotteryTime;
    }

    public Double getLotteryExpend() {
        return lotteryExpend;
    }

    public void setLotteryExpend(Double lotteryExpend) {
        this.lotteryExpend = lotteryExpend;
    }

    public Integer getMaxWinTime() {
        return maxWinTime;
    }

    public void setMaxWinTime(Integer maxWinTime) {
        this.maxWinTime = maxWinTime;
    }

    public String getCreateId() {
        return createId;
    }

    public void setCreateId(String createId) {
        this.createId = createId;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

    @Override
    public String toString() {
        return "Activity{" +
        "id=" + id +
        ", activityType=" + activityType +
        ", activityName=" + activityName +
        ", activityStart=" + activityStart +
        ", activityEnd=" + activityEnd +
        ", activityExplain=" + activityExplain +
        ", loseExplain=" + loseExplain +
        ", winRate=" + winRate +
        ", lotteryTime=" + lotteryTime +
        ", lotteryExpend=" + lotteryExpend +
        ", maxWinTime=" + maxWinTime +
        ", createId=" + createId +
        ", createTime=" + createTime +
        ", updateTime=" + updateTime +
        ", status=" + status +
        "}";
    }
}
